package com.kylin.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kylin.common.utils.PageUtils;
import com.kylin.gulimall.product.entity.BrandEntity;
import com.kylin.gulimall.product.entity.CategoryBrandRelationEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 品牌分类关联
 *
 * @author kylin
 * @email zhang171346168@qq.com
 * @date 2020-12-15 09:43:26
 */
public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 根据获取品牌id 、三级分类id查询对应的名字保存到数据库
     * @param categoryBrandRelation
     */
    void saveDetail(CategoryBrandRelationEntity categoryBrandRelation);

    void updateBrand(Long brandId, String name);

    void updateCategory(@Param("catId") Long catId, @Param("name") String name);

    /**
     * 获取某个分类下所有品牌信息
     * @param catId
     * @return
     */
    List<BrandEntity> getBrandsByCatId(Long catId);
}

